<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>比特灵犀</title>
    <link rel="stylesheet" href="static/css/style.css">
</head>
<body>
    <header>
        <h1>比特灵犀</h1>
        <div class="user-controls">
            <button id="loginBtn">登录</button>
            <button id="registerBtn">注册</button>
            <button id="settingsBtn">设置</button>
        </div>
    </header>
    <div id="upload-loading" style="display:none; position:fixed; top:50%; left:50%; transform:translate(-50%, -50%); z-index:999; background:#fff; padding:10px; border-radius:5px; box-shadow:0 0 10px #aaa;">
        ⏳ 处理中，请稍候...
    </div>

    <main>
        <section class="file-operations">
            <div class="operation-buttons">
                <button id="explainQuestionBtn" class="btn-success">题目讲解</button>
                <button id="contentGen" class="btn-accent">试题生成</button>
                <button id="uploadFileBtn" class="btn-secondary">上传文件</button>
                <!-- 隐藏的文件选择器 -->
                <input type="file" id="fileInput" multiple style="display: none;">
                <button id="createFolderBtn" class="btn-primary">新建文件夹</button>
            </div>
            
            <div id="typeModal" class="typeModal">
                <div class="modal-content">
                    <h3>请选择文件类型</h3>
                    <select id="fileTypeSelect">
                        <option value="wrongQuestion">错题</option>
                        <option value="words">单词</option>
                        <option value="title">标题</option>
                    </select>
                    <div style="margin-top: 10px; display: flex; justify-content: center; gap: 10px;">
                        <button id="confirmTypeBtn">确定</button>
                        <button id="cancelTypeBtn">取消</button>
                    </div>
                </div>
            </div>
        </section>

        <section class="file-browser">
            <div class="breadcrumb">
                <span class="path">/root</span>
            </div>
            <div class="file-list" id="fileList">
                <!-- 文件列表将通过JS动态生成 -->
            </div>
        </section>
    </main>

    <!-- 模态框 -->
    <div id="modal" class="modal">
        <div class="modal-content">
            <span class="close" id="closeModal">&times;</span>
            <div id="modalBody"></div>
        </div>
    </div>

    <script src="static/js/filesys.js"></script>
    <script src="static/js/qa.js"></script>
    <script src="static/js/auth.js"></script>
    <script src="static/js/settings.js"></script>
</body>
</html>
